package com.igbeok.valid.controller;

import javax.validation.Valid;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.igbeok.valid.object.User;

@Controller
@RequestMapping("/validate")
public class ValidController {

	@RequestMapping("")
	public String showPage() {
		return "valided-form";
	}
	
	@RequestMapping("/fail-valid")
	public void saveUser(@Valid User user) {
		System.out.println(user.getUsername());
	}
}
